<?php
require '../$header.php';

$minX = $DB->escape($_POST['swLon']);
$minY = $DB->escape($_POST['swLat']);
$maxX = $DB->escape($_POST['neLon']);
$maxY = $DB->escape($_POST['neLat']);

$return = array();

$DB->query("
	SELECT * 
	FROM spot
");

if($DB->num() > 0)
{
	while($fetch = $DB->fetch())
	{
		$return[] = $fetch;
	}
}

echo json_encode($return);

require '../$footer.php';
?>
